Skip to content

Add mechanism to captureException calls #17237

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

cursor[bot]
Copy link

@cursor cursor bot commented Jul 31, 2025

Before submitting a pull request, please take a look at our
Contributing guidelines and verify:

  • If you've added code that should be tested, please add tests.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).

This PR standardizes captureException calls across all Sentry JavaScript SDK packages by ensuring every call includes a mechanism object with handled and type properties.

This change provides richer context for captured exceptions, improving their actionability in Sentry:

  • handled: Set based on whether the SDK code path explicitly handles the error (e.g., via user-provided fallbacks) or if it's an unexpected, unhandled error.
  • type: Specifies the SDK package and, where possible, a more granular context (e.g., nextjs.route, nestjs.graphql, supabase, openai).

Open in Cursor Open in Web

Learn more about Cursor Agents

@Lms24
Copy link
Member

Lms24 commented Jul 31, 2025

huh interesting. Didn't know cursor opens PRs even if you tell BG workers to just check out stuff locally... I'm splitting these up into individual PRs and made a lot of changes on top. So closing this.

@Lms24 Lms24 closed this Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants